﻿namespace SharedKernel;

public interface IDomainEventHandler<in TDomainEvent> : IDomainEventHandler
    where TDomainEvent : IDomainEvent
{
    ValueTask Handle(TDomainEvent domainEvent, CancellationToken cancellationToken = default);
}

public interface IDomainEventHandler
{
    ValueTask Handle(IDomainEvent domainEvent, CancellationToken cancellationToken = default);
}
